<?php
/**
 * FastApp.
 * 11/18/24
 * @Author 深色的海 (wx:deepsea_0024)
 * @Contact telegram:deepsea159
 */

namespace App\Marketing\Api\Controller;

use App\Fastapp\Api\Controller\ApiController;
use App\Marketing\Api\Service\CashprizeService;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\GetMapping;
use Psr\Http\Message\ResponseInterface;

#[Controller('api/marketing/cashprize')]
class CashprizeController extends ApiController
{

    #[Inject]
    public CashprizeService $service;

    #[GetMapping('detail')]
    public function detail(): ResponseInterface
    {
        return $this->success($this->service->detail($this->request->input('code')));
    }

    #[GetMapping('getRefunded')]
    public function getRefunded(): ResponseInterface
    {
        return $this->success($this->service->getRefunded($this->request->input('no')));
    }
}